package com.tx;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;
@Repository
public class UpdateTest {
	@Autowired
	JdbcTemplate jdbcTemplate;

	@Transactional
	public void insert1() {
		String sql = "insert into user(username,age) values(?,?)";
		int update = jdbcTemplate.update(sql, "wwj1", 20);
	}
}
